import request from '../utils/request';

export async function queryNodeCount(payload) {
  return request('/node/node-count-get', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(payload),
    cache: 'no-cache',
  });
}

export async function queryTaskCount() {
  return request('/api/task/getTaskTotal', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    cache: 'no-cache',
  });
}

export async function queryTaskStatistics() {
  return request('/api/monitor/get-task-statistics', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    cache: 'no-cache',
  });
}

export async function queryJvmMonitor(payload) {
  return request('/monitor/jvm-monitor-data-get', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(payload),
    cache: 'no-cache',
  });
}
